hvm: Inject #UD for un-emulated instructions rather than crash guest
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 28 Nov 2007 13:04:47 +0000 (13:04 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 28 Nov 2007 13:04:47 +0000 (13:04 +0000)
commitfc900cc7d9d53e1e5843535967f40a25221d841d
treea4df1d95bd33150c59b07f76961894d96c82e08c
parentec0ce3927bcf990600c7a11ec1409cedb14b553c
hvm: Inject #UD for un-emulated instructions rather than crash guest

The CrashMe stress test (a process repeatedly forks child processes, and
the child processes initialize a buffer with random numbers, then treat
the buffer as code, and execute it) can crash 32-bit HVM RHEL5.1 guest
easily; this is because we haven't emulated all the instructions in
handle_mmio() yet.

The CrashMe process runs with root rights, and can access MMIO space in
an unknown way ("strace -f" shows the random codes running at CPL=3D3
don't call mmap(), and don't open any special files in /dev/ "); the gpa
may look like 0xa**** or  0xb****, or 0xfee0****. =20

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/hvm/platform.c